package com.ruoyi.merchant.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.LaunchPageMapper;
import com.ruoyi.merchant.domain.LaunchPage;
import com.ruoyi.merchant.service.ILaunchPageService;

/**
 * 启动页配置Service业务层处理
 * 
 * @author chengxin.ju
 * @date 2023-12-07
 */
@Service
public class LaunchPageServiceImpl implements ILaunchPageService 
{
    @Autowired
    private LaunchPageMapper launchPageMapper;

    /**
     * 查询启动页配置
     * 
     * @param id 启动页配置主键
     * @return 启动页配置
     */
    @Override
    public LaunchPage selectLaunchPageById(String id)
    {
        return launchPageMapper.selectLaunchPageById(id);
    }

    /**
     * 查询启动页配置列表
     * 
     * @param launchPage 启动页配置
     * @return 启动页配置
     */
    @Override
    public List<LaunchPage> selectLaunchPageList(LaunchPage launchPage)
    {
        return launchPageMapper.selectLaunchPageList(launchPage);
    }

    /**
     * 新增启动页配置
     * 
     * @param launchPage 启动页配置
     * @return 结果
     */
    @Override
    public int insertLaunchPage(LaunchPage launchPage)
    {
        launchPage.setCreateTime(DateUtils.getNowDate());
        return launchPageMapper.insertLaunchPage(launchPage);
    }

    /**
     * 修改启动页配置
     * 
     * @param launchPage 启动页配置
     * @return 结果
     */
    @Override
    public int updateLaunchPage(LaunchPage launchPage)
    {
        return launchPageMapper.updateLaunchPage(launchPage);
    }

    /**
     * 批量删除启动页配置
     * 
     * @param ids 需要删除的启动页配置主键
     * @return 结果
     */
    @Override
    public int deleteLaunchPageByIds(String[] ids)
    {
        return launchPageMapper.deleteLaunchPageByIds(ids);
    }

    /**
     * 删除启动页配置信息
     * 
     * @param id 启动页配置主键
     * @return 结果
     */
    @Override
    public int deleteLaunchPageById(String id)
    {
        return launchPageMapper.deleteLaunchPageById(id);
    }
}
